import request from '@/utils/request'

// 获取品牌列表
export const fetchBrandList = (params) => {
    return request({
        url: '/brand/list',
        method: 'get',
        params: params
    })
}

// 创建品牌
export const createBrand = (data) => {
    return request({
        url: '/brand/create',
        method: 'post',
        data: data
    })
}

// 更新展示状态
export const updateShowStatus = (data) => {
    return request({
        url: '/brand/update/showStatus',
        method: 'post',
        data: data
    })
}

// 更新出厂状态
export const updateFactoryStatus = (data) => {
    return request({
        url: '/brand/update/factoryStatus',
        method: 'post',
        data: data
    })
}

// 删除品牌
export const deleteBrand = (id) => {
    return request({
        url: '/brand/delete/' + id,
        method: 'get'
    })
}

// 获取品牌
export const getBrand = (id) => {
    return request({
        url: '/brand/' + id,
        method: 'get',
    })
}

// 更新品牌
export const updateBrand = (id, data) => {
    return request({
        url: '/brand/update' + id,
        method: 'post',
        data: data
    })
}




